<%@page import="java.sql.ResultSet"%>
<%@page import="java.sql.PreparedStatement"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>view tests</title>
   <link rel="stylesheet" href="styles/style.css" type="text/css" media="screen" />
   <style type="text/css">
.art-post .layout-item-0 { padding-right: 10px;padding-left: 10px; }
   .ie7 .art-post .art-layout-cell {border:none !important; padding:0 !important; }
   .ie6 .art-post .art-layout-cell {border:none !important; padding:0 !important; }
   </style>
    </head>
    <body>
        <div id="art-page-background-glare-wrapper">
    <div id="art-page-background-glare"></div>
</div>
<div id="art-main">
    <div class="cleared reset-box"></div>
    <div class="art-box art-sheet">
        <div class="art-box-body art-sheet-body">
            <div class="art-layout-wrapper">
                <div class="art-content-layout">
                    <div class="art-content-layout-row">
                        <div class="art-layout-cell art-content">
<div class="art-box art-post">
    <div class="art-box-body art-post-body">
<div class="art-post-inner art-article">
                                <h2 class="art-postheader">courses:
                                </h2>
                                                <div class="art-postcontent">
<div class="art-content-layout">
    <div class="art-content-layout-row">
    <div class="art-layout-cell layout-item-0" style="width: 100%;">
        <br />
        
        <table class="art-article" border="0" cellspacing="0" cellpadding="0" style="width: 100%;background-color: #FFFFFF">
            <tbody>
        <%
        String courseid=request.getParameter("courseid");
        String userid,examid,examdate,duration;
        PreparedStatement p=dbconnector.DBDriver.getPrepare("select * from exam where courseid=?");
        p.setString(1, courseid);
        ResultSet rs=p.executeQuery();
        while(rs.next())
                       {
                       examid=rs.getString("examid");
                       userid=rs.getString("userid");
                       examdate=rs.getString("examdate");
                       duration=rs.getString("examduration");
                       %>
                        <tr style="margin-top:2px">
                    <td>held on :<%=examdate%></td>
        
                    <td style="font-weight: bold; color: #FA5A0A;">duration : <%=duration%> minutes</td>
                    <% if(helper.exam.remainingDays(examid)==0){%>
                    <td style="font-weight: bold; color: #FA5A0A;"><a href="../exam/startexam?examid=<%=examid%>">write now</a></td><%}%>
        
                    
                </tr><%}%>
            </tbody>
        </table>
    </div>
    </div>
</div>
</div></div></div></div></div></div></div></div>
<div class="cleared"></div>
</div></div></div>
</body>
</html>
